166

A Little Bit of Computer Science

166

Cells

A reference to a cell on the spreadsheet. CELLS(x,y) is the value in

row x and column y

Chart

graph

Click

Used to simulate a click on a website

Close

A statement that closes the file

CommandButton

A form button that can execute a macro by clicking it

Comment

A description in the code to enhance its documentation. It is written

with a preceding apostrophe (‘). All test after an apostrophe in the

same line becomes a comment. If the first non-​blank character in

a line is an apostrophe, then the whole line is a comment.

Conditional Statement

See IF Statement

Const

A statement to declare a constant

CreateObject

A statement to create an instance of an object

Data type

The type of data of a variable.

The basic data types are:

Integer—​no decimals (4 bytes)

Long—​larger integer (8 bytes)

Single—​decimal (4bytes)

Double—​decimal (8 bytes)

String—​characters (up to 65400)

Boolean—​True or False

Declaration

A concept of declaring the type and dimension of the variables that

will be used in a program. Visual Basic does not need variables

to be declared unless they are arrays. But it is a good practice

to declare all variables. If a variable is not declared, its type is

assumed by the operation. For example,

Delete

Remove object

Dim Statement

A statement that declares the type of a variable

Dimension of Array

Number of memory units assigned to an array.

An array is a set of variables that can be read and manipulated together.

The dimension is the maximum number of units in this set.

The first member of this set is A(0) where A is the array

If the dimension is N then the last member of this set is A(N-​1)

Dir Function

A function that identifies the folder structure beneath a given

starting point. It behaves very similarly to the DIR in MSDOS or

the Windows Command Prompt

Divide Operation

Divide two operands and store the value in the target variable format

The value is truncated if the target variable is of type integer

For example, X =​ Y/​2

If X is defined as an integer and Y is 11 then X will assume a value

of 5 after this operation.

Else Statement

A part of an IF statement that executes if the IF condition fails